# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=tdlib
pkgver=0.9.2
pkgrel=2
_commit=e8ec9114377574f22ff4447cf29e66411b491b7e # No tags in upstream repo
pkgdesc='Algorithms for computing tree decompositions of graphs'
arch=(any)
url='https://github.com/freetdi/tdlib/'
license=(GPL2)
depends=()
makedepends=(boost git)
source=(git+https://github.com/freetdi/tdlib#commit=$_commit
        no-stderr.patch)
sha256sums=('SKIP'
            '361471a81d187978a8a1a86c2893f3db3706c17ca9fb50eac8e6f22296626737')

prepare() {
  cd $pkgname
  patch -p1 -i ../no-stderr.patch # Remove debug output
  ./bootstrap
}

build() {
  cd $pkgname
  ./configure --prefix=/usr
}

package() {
  cd $pkgname
  make install DESTDIR="$pkgdir"
}
